﻿/*******************************************************************************
 * Copyright © 2016
 * 
 * Description: MVC快速开发平台  FROM http://xmwxgn.com
 *
*********************************************************************************/

using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using ZFine.Domain.Entity;

namespace ZFine.Mapping
{
    public class UserMap : EntityTypeConfiguration<UserEntity>
    {
        public UserMap()
        {
            this.ToTable("Sys_User");
            this.HasKey(t => t.F_Id);

            Property(p => p.F_Id).HasMaxLength(50);
            Property(p => p.F_Account).HasMaxLength(50);
            Property(p => p.F_RealName).HasMaxLength(50);
            Property(p => p.F_NickName).HasMaxLength(50);
            Property(p => p.F_Description).HasMaxLength(500);
            Property(p => p.F_CreatorUserId).HasMaxLength(50);
            Property(p => p.F_LastModifyUserId).HasMaxLength(50);
            Property(p => p.F_DeleteUserId).HasMaxLength(50);
            Property(p => p.F_HeadIcon).HasMaxLength(50);
            Property(p => p.F_MobilePhone).HasMaxLength(20);
            Property(p => p.F_Email).HasMaxLength(50);
            Property(p => p.F_WeChat).HasMaxLength(50);
            Property(p => p.F_ManagerId).HasMaxLength(50);
            Property(p => p.F_Signature).HasMaxLength(500);
            Property(p => p.F_OrganizeId).HasMaxLength(50);
            Property(p => p.F_RoleId).HasMaxLength(500);
            Property(p => p.F_DutyId).HasMaxLength(500);
            //Property(f => f.F_Id).HasColumnName("MemberId").HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
            //Property(p => p.F_Id).HasColumnName("F_Id").HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
        }
    }
}
